﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace HeathCareSystem.wuc
{
    public partial class wucBaoCaoSoLuongBenh : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        protected void btnOK_Click(object sender, EventArgs e)
        {

            string now = txtDateTime.Text;
            string thang = now.Substring(0, 2);
            string nam = now.Substring(6, 4);
            string thangNam = string.Format("{0}-{1}", nam, thang);
                                      
            BenhNhanBUS bnBus = new BenhNhanBUS();
            DataTable dt = bnBus.BaoCaoTheoLoaiBenh(thangNam);
            gvKetQua.DataSource = dt;
            gvKetQua.DataBind();
        }
    }
}